from application.database import db,Base


class MenuIndex(db.Model):
    __tablename__ = 'ncasm_user'
    uuid = db.Column(db.String(36), primary_key=True)
    account = db.Column(db.String(64))
    real_name = db.Column(db.String(64))
    nick_name = db.Column(db.String(64))
    password = db.Column(db.String(64))
    salt = db.Column(db.String(16))
    email = db.Column(db.String(64))
    sex = db.Column(db.String(8))
    is_admin = db.Column(db.Boolean)
    avatar = db.Column(db.String(256))
    create_at = db.Column(db.DateTime)
    create_by = db.Column(db.String(64))
    update_at = db.Column(db.DateTime)
    update_by = db.Column(db.String(64))
    # new stop normal
    status = db.Column(db.String(8))
    # user type(qq wx github)
    type = db.Column(db.String(8))
    third_part_account = db.Column(db.String(256))


class MenuAdmin(db.Model):
    __tablename__ = 'ncasm_menu_admin'
    id = db.Column(db.String(16), primary_key=True)
    pid = db.Column(db.String(16))
    title = db.Column(db.String(256))
    icon = db.Column(db.String(256))
    href = db.Column(db.String(256))
    target = db.Column(db.String(32))
    sort = db.Column(db.String(16))
    status = db.Column(db.String(8))
    remark = db.Column(db.String(8))
    create_at = db.Column(db.DateTime)
    update_at = db.Column(db.DateTime)
    delete_at = db.Column(db.DateTime)
